package cn.yitun.chat.yitunserverimapicore.business.group.service;

import cn.yitun.chat.yituncommonmessage.Info;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.group.GroupInviteApplyDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.group.GroupJoinApplyDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.group.GroupInviteApplyVo;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.group.GroupJoinApplyVo;

import java.util.List;

/**
 * 
 * Date 2019-01-23 22:01:34<br>
 * Description
 * 
 * @author yitun
 * @since 1.0.0
 */
public interface GroupManageService {


	/**
	 * 
	 * Date 2019-01-24 22:08:14<br>
	 * Description 管理员或者群主获取申请加入群的请求列表
	 * 
	 * @author yitun
	 * @param userId
	 * @return
	 * @since 1.0.0
	 */
	List<GroupJoinApplyVo> getJoinRequestListByUserId(Long userId, int pageNo, int pageSize);

	List<GroupJoinApplyVo> queryJoinRequestList(GroupJoinApplyDto query);

	/**
	 * 
	 * Date 2019-01-26 09:34:41<br>
	 * Description 管理员或者群主获取审批邀请的用户
	 * 
	 * @author yitun
	 * @param query
	 * @return
	 * @since 1.0.0
	 */
	List<GroupInviteApplyVo> queryInviteRequestList(GroupInviteApplyDto query);

	/**
	 * 邀请入群 计数
	 * @param query
	 * @return
	 */
	int countInviteRequestList(GroupInviteApplyDto query);

	/**
	 * 
	 * Date 2019-01-26 14:54:46<br>
	 * Description 转让群主
	 * 
	 * @author yitun
	 * @param groupId
	 * @param oldOwnerUserId
	 * @param newOwnerUserId
	 * @return
	 * @since 1.0.0
	 */
	Info changeGroupOwner(Long groupId, Long oldOwnerUserId, Long newOwnerUserId);

	/**
	 * 
	 * Date 2019-01-26 15:01:20<br>
	 * Description 解散群
	 * 
	 * @author yitun
	 * @param groupId
	 * @param ownerUserId
	 * @return
	 * @since 1.0.0
	 */
	Info disbandGroup(Long groupId, Long ownerUserId);

	/**
	 * 请求入群 计数
	 * @param query
	 * @return
	 */
	int countJoinRequest(GroupJoinApplyDto query);

}
